package cn.ilikes.tools.nosql.jpa.clients.indexs.index.hbases;

import java.io.Closeable;
import java.io.IOException;
import java.util.Collection;

import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.IndexWriterConfig;
import org.apache.lucene.index.IndexableField;
import org.apache.lucene.index.LiveIndexWriterConfig;
import org.apache.lucene.index.SegmentInfoPerCommit;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.TwoPhaseCommit;
import org.apache.lucene.index.MergePolicy.OneMerge;
import org.apache.lucene.search.Query;
import org.apache.lucene.store.Directory;

import cn.ilikes.tools.nosql.jpa.JPASQLNoSupportException;

public class LuceneHbaseIndexWriterBase {

	private void exception(String message) throws JPASQLNoSupportException {
		throw new JPASQLNoSupportException(message);
	}

	private void noSupportException() throws JPASQLNoSupportException {
		exception("this no support ! ");
	}

	public void addDocument(Iterable<? extends IndexableField> doc, Analyzer analyzer) throws IOException {
		noSupportException();
	}

	public void addDocument(Iterable<? extends IndexableField> doc) throws IOException {
		noSupportException();
	}

	public void addDocuments(Iterable<? extends Iterable<? extends IndexableField>> docs, Analyzer analyzer) throws IOException {
		noSupportException();
	}

	public void addDocuments(Iterable<? extends Iterable<? extends IndexableField>> docs) throws IOException {
		noSupportException();
	}

	public void addIndexes(Directory... dirs) throws IOException {
		noSupportException();
	}

	public void addIndexes(IndexReader... readers) throws IOException {
		noSupportException();
	}

	public void close() throws IOException {
		noSupportException();
	}

	public void close(boolean waitForMerges) throws IOException {
		noSupportException();
	}

	public synchronized void deleteAll() throws IOException {
		noSupportException();
	}

	public void deleteDocuments(Query... queries) throws IOException {
		noSupportException();
	}

	public void deleteDocuments(Query query) throws IOException {
		noSupportException();
	}

	public void deleteDocuments(Term... terms) throws IOException {
		noSupportException();
	}

	public void deleteDocuments(Term term) throws IOException {
		noSupportException();
	}

	public synchronized void deleteUnusedFiles() throws IOException {
		noSupportException();
	}

	protected void doAfterFlush() throws IOException {
		noSupportException();
	}

	protected void doBeforeFlush() throws IOException {
		noSupportException();
	}

	public void forceMerge(int maxNumSegments, boolean doWait) throws IOException {
		noSupportException();
	}

	public void forceMerge(int maxNumSegments) throws IOException {
		noSupportException();
	}

	public void forceMergeDeletes() throws IOException {
		noSupportException();
	}

	public void forceMergeDeletes(boolean doWait) throws IOException {
		noSupportException();
	}

	public Analyzer getAnalyzer() {
		throw new JPASQLNoSupportException("this no support ! ");
	}

	public LiveIndexWriterConfig getConfig() {
		throw new JPASQLNoSupportException("this no support ! ");
	}

	public Directory getDirectory() {
		throw new JPASQLNoSupportException("this no support ! ");
	}

	public synchronized Collection<SegmentInfoPerCommit> getMergingSegments() {
		throw new JPASQLNoSupportException("this no support ! ");
	}

	public synchronized OneMerge getNextMerge() {
		throw new JPASQLNoSupportException("this no support ! ");
	}

	public synchronized boolean hasDeletions() {
		throw new JPASQLNoSupportException("this no support ! ");
	}

	public synchronized boolean hasPendingMerges() {
		throw new JPASQLNoSupportException("this no support ! ");
	}

	public synchronized int maxDoc() {
		throw new JPASQLNoSupportException("this no support ! ");
	}

	public void merge(OneMerge merge) throws IOException {
		throw new JPASQLNoSupportException("this no support ! ");
	}

	public int numDeletedDocs(SegmentInfoPerCommit info) {
		throw new JPASQLNoSupportException("this no support ! ");
	}

	public synchronized int numDocs() {
		throw new JPASQLNoSupportException("this no support ! ");
	}

	public void rollback() throws IOException {
		noSupportException();
	}

	public synchronized String segString() {
		throw new JPASQLNoSupportException("this no support ! ");
	}

	public synchronized String segString(Iterable<SegmentInfoPerCommit> infos) {
		throw new JPASQLNoSupportException("this no support ! ");
	}

	public synchronized String segString(SegmentInfoPerCommit info) {
		throw new JPASQLNoSupportException("this no support ! ");
	}

	public synchronized boolean tryDeleteDocument(IndexReader readerIn, int docID) throws IOException {
		throw new JPASQLNoSupportException("this no support ! ");
	}

	public void updateDocument(Term term, Iterable<? extends IndexableField> doc, Analyzer analyzer) throws IOException {
		throw new JPASQLNoSupportException("this no support ! ");
	}

	public void updateDocument(Term term, Iterable<? extends IndexableField> doc) throws IOException {
		noSupportException();
	}

	public void updateDocuments(Term delTerm, Iterable<? extends Iterable<? extends IndexableField>> docs, Analyzer analyzer) throws IOException {
		noSupportException();
	}

	public void updateDocuments(Term delTerm, Iterable<? extends Iterable<? extends IndexableField>> docs) throws IOException {
		noSupportException();
	}

	public synchronized void waitForMerges() {
		noSupportException();
	}

	public void commit() throws IOException {
		noSupportException();

	}

	public void prepareCommit() throws IOException {
		noSupportException();

	}

}
